CFLAGS  := 
DFLAGS := -lflann
CPP := clang++ -O2
CC  := clang -O2
INC := -I. -I./include -I/usr/include/python2.7
SRCS := $(wildcard lib/*.cpp)
DEPS := $(patsubst %.cpp, %.o, $(SRCS))
PROGS := $(wildcard *.cpp)
PROGDEPS := $(patsubst %.cpp, %.o, $(PROGS))

all: $(PROGDEPS) $(DEPS)
	$(CPP) -o DS_cate_speed DS_cate_speed.o $(DEPS) $(DFLAGS)

.cpp.o:
	$(CPP) -c -o $@ $< $(INC) $(GDALINC) $(CFLAGS)
.c.o:
	$(CC) -c -o $@ $< $(INC)
clean:
	-find ./ -name "*.o"|xargs rm
	-rm DS_cate_speed
